import { defineStore } from "pinia";

export const useCountStore = defineStore('count', {
    state() {
        return {
            sum: 6,
        }
    },
    getters: {
        // 双倍
        doubleCount(state) {
            return state.sum * 2;
        },
        // 双倍加一
        doublePlusOne(): number {
            return this.sum * 2 + 1;
        },
    },
})